home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 3006 / 3006.xpi / chrome / dwhelper.jar / content / mp3tunes / conversion-choice.xul next >
Extensible Markup Language  |  2010-01-15  |  2KB  |  61 lines

  1. <?xml version="1.0"?> 
  2. <!-- *****************************************************************************
  3.  *            Copyright (c) 2006 Michel Gutierrez. All Rights Reserved.
  4.  ****************************************************************************** -->
  5. <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> 
  6. <?xml-stylesheet href="chrome://dwhelper/skin/dwhelper.css" type="text/css"?>
  7. <?xml-stylesheet href="chrome://dwhelper/content/bindings.css" type="text/css"?>
  8.  
  9. <!DOCTYPE window SYSTEM "chrome://dwhelper/locale/dwhelper.dtd" >
  10.  
  11. <dialog id="mp3tune-conversion-choice"
  12.         title="&mp3tunes.title.conversion-choice;"
  13.         onload="onLoad()"
  14.         ondialogaccept="return doOk();"
  15.         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  16.         xmlns:html="http://www.w3.org/1999/xhtml"
  17.         >
  18.  
  19.     <script>
  20. <![CDATA[
  21.  
  22. var dialogData={}
  23.  
  24. function onLoad() {
  25.     dialogData.target=window.arguments[0].target;
  26.     dialogData.choice=document.getElementById("choice");
  27.     dialogData.remember=document.getElementById("remember");
  28.     var prefService=Components.classes["@mozilla.org/preferences-service;1"]
  29.                                        .getService(Components.interfaces.nsIPrefService);
  30.     dialogData.pref=prefService.getBranch("dwhelper.mp3tunes.");
  31.     
  32.     var choice="video";
  33.     try {
  34.         choice=dialogData.pref.getCharPref("upload."+dialogData.target+".last");
  35.     } catch(e) {}
  36.     dialogData.choice.value=choice;
  37. }
  38.  
  39. function doOk() {
  40.     window.arguments[0].choice=dialogData.choice.value;
  41.     dialogData.pref.setCharPref("upload."+dialogData.target+".last",dialogData.choice.value);
  42.     if(dialogData.remember.checked)
  43.         dialogData.pref.setCharPref("upload."+dialogData.target,dialogData.choice.value);
  44.     return true;
  45. }
  46.  
  47. ]]>
  48.     </script>
  49.  
  50.     <vbox>
  51.         <menulist id="choice">
  52.             <menupopup>
  53.                 <menuitem label="&mp3tunes.pref.on-send.video;" value="video"/>
  54.                 <menuitem label="&mp3tunes.pref.on-send.audio;" value="audio"/>
  55.             </menupopup>
  56.         </menulist>
  57.         <checkbox id="remember" label="&mp3tunes.label.conversion-choice.remember;"/>
  58.     </vbox>
  59.  
  60. </dialog>
  61.